package com.gxpt.app.adapter;

import android.content.Context;
import android.widget.TextView;

import com.gxpt.app.R;
import com.gxpt.app.base.ListBaseAdapter;
import com.gxpt.app.base.SuperViewHolder;
import com.gxpt.app.bean.assesslist_bean;
import com.gxpt.app.bean.jiahomepage_bean;

/**
 * Created by Lzx on 2016/12/30.
 */

public class jiahomepage_Adapter extends ListBaseAdapter<jiahomepage_bean.jiahomepage.demand> {

    Context context;
//    int pic_view_width = 0;
//    int pic_view_hight = 0;
    public jiahomepage_Adapter(Context context) {
        super(context);
        this.context = context;
//
//        int Sviewwidth  = ScreenUtils.getScreenWidth(context);//
//        pic_view_width  = Sviewwidth/8;
//        pic_view_hight  = pic_view_width;
    }

    @Override
    public int getLayoutId() {
        return R.layout.item_life_user_detail_list;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        jiahomepage_bean.jiahomepage.demand item = mDataList.get(position);

        TextView txt_title = holder.getView(R.id.txt_title);
        txt_title.setText(item.title);

        TextView txt_bid_status = holder.getView(R.id.txt_bid_status);
        txt_bid_status.setText(item.bid_status);

        TextView txt_bid_count = holder.getView(R.id.txt_bid_count);
        txt_bid_count.append(item.bid_count);

        TextView txt_project_amount = holder.getView(R.id.txt_project_amount);
        txt_project_amount.setText("￥"+item.project_amount);

        TextView txt_create_time = holder.getView(R.id.txt_create_time);
        txt_create_time.setText(item.create_time);


    }
}
